package com.xinqi.modules.chat.chat.friend.client;

import com.xinqi.common.base.constants.ServiceNameConstants;
import com.xinqi.common.base.response.R;
import com.xinqi.modules.chat.chat.friend.factory.ChatFriendFallbackFactory;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * 好友列表客户端
 *
 * @author: system
 * @date: 2023/01/12
 */
@FeignClient(contextId = "chatFriendClient", value = ServiceNameConstants.XQ_CHAT, fallbackFactory = ChatFriendFallbackFactory.class)
public interface ChatFriendClient {

    /**
     * 注册时初始化好友列表
     *
     * @param userId
     * @return
     */
    @PostMapping("/inner/chat-friend/initFriend")
    R<Boolean> initFriend(@RequestParam("userId") Long userId);

}
